package com.secxiot.provider.user.dao;

import com.secxiot.provider.user.entity.SysExchangeRecord;
import com.secxiot.provider.user.entity.SysExchangeRules;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface IntegralDao {

    /**
     * 添加积分兑换记录
     * @param exchangeRulesId 兑换规则ID
     * @return
     */
    SysExchangeRules getExchangeRulesById(Long hospitalId,Long exchangeRulesId);

    /**
     * 添加积分兑换记录
     * @param sysExchangeRecord 兑换记录对象
     * @return
     */
    Integer saveIntegralExchange(SysExchangeRecord sysExchangeRecord);

    /**
     * 获取兑换列表
     * @param userId
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<SysExchangeRecord> getExchangeRecordList(Long userId, Long pageNo, Long pageSize);

    /**
     * 获取兑换规则
     *
     * @param hospitalId 医院ID
     * @return
     */
    List<SysExchangeRules> getExchangeRules(Long hospitalId);
}
